package com.toe.commodity.webapi.service.impl;

import com.toe.pojo.entity.commodity.CommodityGoodsAlbum;
import com.toe.commodity.webapi.mapper.CommodityGoodsAlbumMapper;
import com.toe.commodity.service.CommodityGoodsAlbumService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.toe.pojo.vo.commodity.CommodityGoodsAlbumVO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 陶涛
 * @since 2022-07-19
 */
@Service
@DubboService
public class CommodityGoodsAlbumServiceImpl extends ServiceImpl<CommodityGoodsAlbumMapper, CommodityGoodsAlbum> implements CommodityGoodsAlbumService {

    @Autowired
    CommodityGoodsAlbumMapper commodityGoodsAlbumMapper;

    @Override
    public List<CommodityGoodsAlbumVO> getGoodsUrlByGoodsId(Long id) {
        return commodityGoodsAlbumMapper.getGoodsUrlByGoodsId(id);
    }

    @Override
    public void addNewGoodsUrl(CommodityGoodsAlbumVO commodityGoodsAlbumVO) {
        commodityGoodsAlbumMapper.addNewGoodsUrl(commodityGoodsAlbumVO);
    }

    @Override
    public void deletedAlbumByUrl(Long id) {
        commodityGoodsAlbumMapper.deletedAlbumByUrl(id);
    }
}
